#ifndef _src_memoryMap_h_
#define _src_memoryMap_h_

char testMemoryMap[] = {
  0x0D, 0x0B, 0x00, // Jump to program Entry  //0
  0xFF, 0x7F, 0xFC, 0x01, 0x00, // Constants  //3
  0x00, 0x01, 0x00, // Variables              //8

  // Move initial values to registers
  0x02, 0x09, 0x00, 0x00, // Read 0x0900 rega //11
  0x02, 0x0A, 0x00, 0x01, // Read 0x0A00 regb //15
  0x02, 0x08, 0x00, 0x02, // Read 0x0800 regc //19
                  
  // Entry point for loop
  // Basically a do-while
  0x03, 0x00, 0x09, 0x00, //23
  0x03, 0x01, 0x0A, 0x00, //27

  // Jump if regc is not equal to zero
  0x0F, 0x02, 0x2A, 0x00, //31
  // Else read in pattern[0]
  0x02, 0x04, 0x00, 0x03, //35
  0x02, 0x06, 0x00, 0x02, //39
  0x0D, 0x39, 0x00, // Jump to write-out //42

  // Read in pattern[1]
  0x02, 0x05, 0x00, 0x03, //46
  0x02, 0x06, 0x00, 0x02, //50
  0x0D, 0x39, 0x00,       //Jump to write-out //53

  // Write memory addr to memory location
  0x03, 0x00, 0x43, 0x00, //ArgA //57
  0x03, 0x01, 0x44, 0x00, //ArgB //61
  0x03, 0x03, 0x00, 0x00, //Write regd to ArgA, ArgB //65
                       
  // Loop control
  0x02, 0x03, 0x00, 0x03, // Read 0x0300 to regd  (value of memory should be 0xFF) //69
  0x05, 0x03, 0x00,       // Sub regd, rega //72
  0x0E, 0x06, 0x5A, 0x00, // Jez //76
  0x02, 0x04, 0x00, 0x03, // Read 0x0400 to regd  (value of memory should be 0x7F) //80
  0x05, 0x03, 0x01,       // Sub regd, regb //84
  0x0F, 0x06, 0x17, 0x00, // Jnz //87
  0xFF,                   // End program if zero //88
                          
  // Increment regb
  0x02, 0x06, 0x00, 0x03, // Read 0x0600 to regd (value of memory should be 0x01) //92
  0x04, 0x03, 0x01,       // Add regd to regb //95
  0x01, 0x06, 0x02,       // Mov regacc to regb //98
  0x0D, 0x17, 0x00,       // Jump to start of program //101
};

#endif